package project_part2;

import static org.junit.Assert.*;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collection;
import java.util.Date;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;

import java.util.GregorianCalendar;

@RunWith(Parameterized.class)
public class ContactTest {

	@Parameters
	public static Collection<Object[]> data() {

		GregorianCalendar cal = new GregorianCalendar(2011, 6, 1);
		SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy");
		Object values[][]= new Object[356][2];
		int age = 9;

		cal.add(Calendar.HOUR,-4248);
		
		for (int i = 0; i < 356; i++) {

			if(i==177)
				age++;

			values[i][0] = dateFormat.format(cal.getTime());
			values[i][1] = age;		
			
			cal.add(Calendar.HOUR, 24);
		}

		return Arrays.asList(values);

	}

	@Test
	public void testGetAge(String date, int age) {
		Contact contact = new Contact("A", "B", "C", "06/01/2001");
		

		
	

	}

}
